export function debounce(func: Function, wait = 500) {
      let timer: any = null;
      return () => {
            if (timer !== null) clearTimeout(timer);
            timer = setTimeout(func, wait);
      };
}
